package com.lw.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户通知公告表 实体类。
 *
 * @author lw
 * @since 2025年05月27日 18:09:06
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户通知公告表")
@Table("tb_user_notice")
public class TbUserNotice implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "id")
    private Long id;

    /**
     * 公共通知id
     */
    @Schema(description = "公共通知id")
    private Long noticeId;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 读取状态（0: 未读, 1: 已读）
     */
    @Schema(description = "读取状态（0: 未读, 1: 已读）")
    private Integer isRead;

    /**
     * 阅读时间
     */
    @Schema(description = "阅读时间")
    private LocalDateTime readTime;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除(0: 未删除, 1: 已删除)
     */
    @Schema(description = "逻辑删除(0: 未删除, 1: 已删除)")
    private Integer isDeleted;

}
